package com.jinhua.batch.model;




import com.jinhua.batch.constant.StageEnum;

import java.util.List;
import java.util.Objects;

/**
 * Copyright
 *
 * @Author WuHuang
 * @Date 2023/3/31
 */
public class ProgressVO {
    private String taskId;
    private String currentStage;
    private String currentStageProgressDetail;
    private List<String> allStageList = StageEnum.getNormalStageDescList();
    private int failCount;
    private int successCount;
    private int totalCount;
    private String uploadFileUrl;
    private String resultUrl = null;

    public ProgressVO() {
    }

    public String getTaskId() {
        return this.taskId;
    }

    public String getCurrentStage() {
        return this.currentStage;
    }

    public String getCurrentStageProgressDetail() {
        return this.currentStageProgressDetail;
    }

    public List<String> getAllStageList() {
        return this.allStageList;
    }

    public int getFailCount() {
        return this.failCount;
    }

    public int getSuccessCount() {
        return this.successCount;
    }

    public int getTotalCount() {
        return this.totalCount;
    }

    public String getUploadFileUrl() {
        return this.uploadFileUrl;
    }

    public String getResultUrl() {
        return this.resultUrl;
    }

    public void setTaskId(final String taskId) {
        this.taskId = taskId;
    }

    public void setCurrentStage(final String currentStage) {
        this.currentStage = currentStage;
    }

    public void setCurrentStageProgressDetail(final String currentStageProgressDetail) {
        this.currentStageProgressDetail = currentStageProgressDetail;
    }

    public void setAllStageList(final List<String> allStageList) {
        this.allStageList = allStageList;
    }

    public void setFailCount(final int failCount) {
        this.failCount = failCount;
    }

    public void setSuccessCount(final int successCount) {
        this.successCount = successCount;
    }

    public void setTotalCount(final int totalCount) {
        this.totalCount = totalCount;
    }

    public void setUploadFileUrl(final String uploadFileUrl) {
        this.uploadFileUrl = uploadFileUrl;
    }

    public void setResultUrl(final String resultUrl) {
        this.resultUrl = resultUrl;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof ProgressVO;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ProgressVO that = (ProgressVO) o;
        return failCount == that.failCount && successCount == that.successCount && totalCount == that.totalCount && Objects.equals(taskId, that.taskId) && Objects.equals(currentStage, that.currentStage) && Objects.equals(currentStageProgressDetail, that.currentStageProgressDetail) && Objects.equals(allStageList, that.allStageList) && Objects.equals(uploadFileUrl, that.uploadFileUrl) && Objects.equals(resultUrl, that.resultUrl);
    }

    @Override
    public int hashCode() {
        return Objects.hash(taskId, currentStage, currentStageProgressDetail, allStageList, failCount, successCount, totalCount, uploadFileUrl, resultUrl);
    }

    public String toString() {
        return "ProgressVO(taskId=" + this.getTaskId() + ", currentStage=" + this.getCurrentStage() + ", currentStageProgressDetail=" + this.getCurrentStageProgressDetail() + ", allStageList=" + this.getAllStageList() + ", failCount=" + this.getFailCount() + ", successCount=" + this.getSuccessCount() + ", totalCount=" + this.getTotalCount() + ", uploadFileUrl=" + this.getUploadFileUrl() + ", resultUrl=" + this.getResultUrl() + ")";
    }
}

